﻿<!DOCTYPE html>
<!--合规性评价及符合性评审管理--->
<html>

<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
        <script src="/static/js/common.js"></script>

    <style>
        .el-dialog__body {
            height: 100% !important;
        }

        .el-dialog.is-fullscreen {
            overflow: hidden !important;
        }
        .el-dialog__wrapper {
            position: absolute !important;
        }
    </style>
</head>

<body>
    
<div id="app" v-cloak>   
        <el-form label-position="right" ref="form" :inline="true" :model="formInline" class="demo-form-inline"
            style="margin-bottom: 15px;">
            <!--头部按钮-->
            <el-row>
                <el-col class="head-tool">
                    
<div class="new_title fl"><strong><img src="/static/images/icon1.png" />合规性评价及符合性评审管理列表</strong>
                    </div>
                    <span>
                        <btn :text="col.btnSelect" imgsrc="/static/images/search.png" linetype="3" @click="onSubmit">
                        </btn>
                        <btn :text="col.btnReview" imgsrc="/static/images/general.png" linetype="3"
                            @click="FileAudit('tj')"></btn>
                        <btn-export-list url="/api/FL_StandardInformationWeb/Comexport" :forminline="this.formInline" linetype="4"></btn-export-list>
                    </span>
                </el-col>
            </el-row>

            <!--头部文本框-->
            <el-row>
                <!--工厂组件-->
                <list-factorys @change="factoryChange" v-model="formInline.model.createFactory"></list-factorys>
                <!--文件级别-->
                <el-col :xs="8" :sm="8" :md="8" :lg="6" :xl="6">
                    <div class="elst-select-mini">
                        <el-form-item>
                            <el-input size="mini">
                                <template slot="prepend">
                                    {{LawRegulationsVerify.FileLeve+mark.m}}
                                </template>
                                <el-select @visible-change="visibleChange" v-model="formInline.model.FileLeve" slot="suffix"
                                           :placeholder="LawRegulationsVerify.FileLeve">
                                    <el-option label="请选择" value=""></el-option>
                                    <el-option v-for="item in FileLevel" :label="item.fileLeve" :value="item.id">
                                    </el-option>
                                </el-select>
                            </el-input>
                        </el-form-item>
                    </div>
                </el-col>
                <!--法律法规名称-->
                <el-col :xs="8" :sm="8" :md="8" :lg="6" :xl="6">
                    <div class="elst-select-mini">
                        <el-form-item>
                            <el-input v-model="formInline.model.LawRegulationsName"
                                      :placeholder="LawRegulationsVerify.LawRegulationsName" size="mini">
                                <template slot="prepend">
                                    {{LawRegulationsVerify.LawRegulationsName+mark.m}}
                                </template>
                            </el-input>
                        </el-form-item>
                    </div>
                </el-col>
                <!--备注-->
                <el-col :xs="8" :sm="8" :md="8" :lg="6" :xl="6">
                    <div class="elst-select-mini">
                        <el-form-item>
                            <el-input v-model="formInline.model.Remarks" :placeholder="LawRegulationsTable.Remarks"
                                      size="mini">
                                <template slot="prepend">
                                    {{LawRegulationsTable.Remarks+mark.m}}
                                </template>
                            </el-input>
                        </el-form-item>
                    </div>
                </el-col>
            </el-row>
            <!--头部文本框结束-->
        </el-form>

        <!--下方表格-->
        <el-table stripe ref="table" :data="ListItem.tableData" :row-key="getRowKeys" :height="ListItem.tableHeight"
                  border @selection-change="handleSelectionChange" row-style="height:10px" style="width: 100%;">
            <!--复选框-->
            <el-table-column type="selection" style=" padding-top: 0px; padding-bottom: 0px;" align="center" width="55"
                             :reserve-selection="true">
            </el-table-column>
            <!--第一列-->
            <el-table-column type="index" :label="LawRegulationsTable.id" show-overflow-tooltip="true" width="50" :index="indexMethod"></el-table-column>
            <!--第二列-->
            <el-table-column prop="mark01" :label="LawRegulationsTable.FileLeve" show-overflow-tooltip="true"
                             min-width="110">
            </el-table-column>
            <!--第三列-->
            <el-table-column prop="lawRegulationsName" :label="LawRegulationsTable.LawRegulationsName" min-width="200"
                             show-overflow-tooltip="true">
            </el-table-column>
            <!--第四列-->
            <el-table-column prop="issueSubject" :label="LawRegulationsTable.IssueSubject" min-width="180"
                             show-overflow-tooltip="true">
            </el-table-column>
            <!--第五列-->
            <el-table-column prop="symbol" :label="LawRegulationsTable.Symbol" min-width="180"
                             show-overflow-tooltip="true">
            </el-table-column>
            <!--第六列-->
            <el-table-column prop="issueDate" width="120" :label="LawRegulationsTable.IssueDate"
                             show-overflow-tooltip="true" :formatter="myformatDate">
            </el-table-column>
            <!--第七列-->
            <el-table-column prop="implementationDate" width="120" :label="LawRegulationsTable.ImplementationDate"
                             show-overflow-tooltip="true" :formatter="myformatDate">
            </el-table-column>

            <el-table-column prop="applyClause" min-width="150" :label="LawRegulationsTable.ApplyClause"
                             show-overflow-tooltip="true">
            </el-table-column>
            <el-table-column prop="describeForWork" min-width="150" :label="LawRegulationsTable.DescribeForWork"
                             show-overflow-tooltip="true">
            </el-table-column>
            <el-table-column prop="mark03" min-width="150" :label="LawRegulationsTable.BelongToClass"
                             show-overflow-tooltip="true">
            </el-table-column>
            <el-table-column prop="mark04" min-width="150" :label="LawRegulationsTable.SpecificImplement"
                             show-overflow-tooltip="true">
            </el-table-column>
            <el-table-column prop="mark05" min-width="150" :label="LawRegulationsTable.Understand"
                             show-overflow-tooltip="true">
            </el-table-column>


            <!--第八列-->
            <el-table-column prop="mark06" :label="ComplianceAssessmentManag0603.CAM_Compliance" width="150">
            </el-table-column>

            <!--第九列-->
            <el-table-column prop="mark07"
                             :label="ComplianceAssessmentManag0603.CAM_ComplianceStatement" min-width="150"
                             show-overflow-tooltip="true">
            </el-table-column>

            <!--第十列-->
            <el-table-column prop="mark08" :label="ComplianceAssessmentManag0603.CAM_ReviewPerson"
                             min-width="120" show-overflow-tooltip="true">
            </el-table-column>
            <!--第十一列-->
            <el-table-column prop="mark09" width="120" :label="ComplianceAssessmentManag0603.CAM_ReviewDate" :formatter="myformatDate">
            </el-table-column>
            <!--第十二列-->
            <!--第十二列-->
            <el-table-column prop="mark10" min-width="120" show-overflow-tooltip="true"
                             :label="LawRegulationsTable.Remarks">
            </el-table-column>
        </el-table>
        <!--表格结束-->
        <!--分页开始-->
        <el-row type="flex" justify="end">


            <el-pagination ref="page" @size-change="handleSizeChange" @current-change="handleCurrentChange"
                :current-page="ListItem.currentPage" :page-sizes="ListItem.pagesizes" :page-size="ListItem.pagesize"
                :layout="ListItem.layout" :total="ListItem.total">
            </el-pagination>

        </el-row>
        <!--分页结束-->
        <!--评审界面开始-->
        <!--分页结束-->
        <el-dialog title="评审" fullscreen="true" :visible.sync="ListItem.dialogVisible" @close='closeDialog' width="80%"
            height="80%" top="10vh">
            <iframe ref="iframe" :src="ListItem.InputUrl" style="height:95%;width:100%" frameborder="0"></iframe>
        </el-dialog>
        <!--评审界面结束-->
    </div>

    <script>
        var app = new Vue({
            el: '#app',
            data: {
                ListItem: ListItem,
                //获取下拉菜单--文件级别
                FileLevel: [],
                formInline: {
                    model: { FileLeve: '', LawRegulationsName: '', CAM_Mark: '' },
                    offset: 0,
                    limit: 10
                },
                currentRow: null,
                multipleSelection: []
            },
            mounted: function () {

                //初始化数据
              //  this.GetPageData(1);
                //列表高度自适应
                tablehigh(this);
                this.GetLevelData();
                //获取下拉菜单内容
              //  this.FileLeve = getDicData('65');
                //console.log("xxxxxxxxxx");
                //console.log(this.FileLeve = getDicData('65'));
                //console.log("xxxxxxxxxx");
            },
            methods: {
                //解決edge下select bug
                visibleChange: function (isVisible) {
                    visibleChange(isVisible)
                },
                factoryChange: function () {
                    //var aa = this.formInline.model.createFactory;
                    this.GetPageData(1);
                },
                indexMethod: function (index) {
                    return (this.ListItem.currentPage - 1) * this.ListItem.pagesize + index + 1;
                },
                //获取分页数据
                GetPageData: function (currentIndex) {
                    GetPageData(this, currentIndex, '/api/FL_StandardInformationWeb/GetList')
                },
                //查询实现方法
                onSubmit: function () { onSubmit(this); },
                //跳页触发方法
                handleCurrentChange: function (val) { handleCurrentChange(this, val); },
                //列表选择触发
                handleSelectionChange: function (val) { this.multipleSelection = val; },
                //pagesize改变 触发方法
                handleSizeChange: function (val) { handleSizeChange(this, val); },
                //获取下拉菜单数据
                getDropDown: function () {
                },
                GetLevelData: function () {
                    var mythis = this;
                    myAjax("post", mythis, '/api/FL_FileLevel/GetList', { model: {}, offset: 0, limit: 10 }, function (response) {
                        mythis.FileLevel = response.data.pageData
                    });
                },
                //评审实现
                FileAudit: function () {
                    if (this.multipleSelection.length == 0) {
                        alert("请选择评审项！");
                    }
                    else {
                        //var a = [];
                        //var j = 0;
                        //for (var i = 0; i < this.multipleSelection.length; i++) {
                        //    a = this.multipleSelection[i].AuditStatus;
                        //    console.log("xxxxxxxxxxxxxxx");
                        //    console.log(a);
                        //    console.log("xxxxxxxxxxxxxxx");
                        //    if (a == "已审核") {
                        //        j = j + 1;
                        //    } else {
                        //        console.log(j);
                        //        j = j;
                        //    }
                        //}
                        //if (j > 0) {
                        //    alert("存在已审核项,请检查");
                        //} else {
                        //    alert("审核成功");
                        if (this.multipleSelection.length == 1) {

                            var sid = "";
                            //var sCAM_Compliance = "";
                            var j = 0;
                            for (var i = 0; i < this.multipleSelection.length; i++) {
                                sid = this.multipleSelection[i].id;
                                sCAM_Compliance = this.multipleSelection[i].mark07;
                            }
                            //UserInput('xg', sid);
                            //if (sCAM_Compliance == "") {
                            //    DialogShow(this, 'xg', "ComplianceAssessmentManagInput.html", sid);
                            //} else {
                            //    alert("已评审！");
                            //}
                            DialogShow(this, 'xg', "ComplianceAssessmentManagInput.html", sid);

                        } else {
                            alert("不可以选择多个！");
                        }

                    }
                    //console.log(a);
                },
                //导出--暂时此提示--之后根官标实现
                FileExcel: function () {
                    myAjax("post", this, '/api/FL_StandardInformationWeb/Comexport', null,
                        function (response) {
                            console.log(response);
                            if (response.result == "Success") {
                                showMessage(response.message, 'success');
                            }
                            else {
                                showMessage(response.message, 'fail');
                            }

                        });
                },
            },
        });
    </script>


</body>

</html>